---
name: Space
route: /space
menu: 业务组件
---

import {Playground} from 'docz';
import Space from './space';
import './space.scss';

import Button from '../Button';
import '../Button/button.scss';

# 基本用法

为子元素添加间距

<Playground>
  <Space>
    <Button>Button</Button>
    <Button type="primary">Primary Button</Button>
    <Button type="success">Success Button</Button>
    <Button type="warning">Warning Button</Button>
    <Button type="danger">Danger Button</Button>
    <Button type="link">Link Button</Button>
  </Space>
</Playground>

<br/>
自动换行

<Playground>
  <div style={{width: '30%'}}>
    <Space>
    <Button>Button</Button>
    <Button type="primary">Primary Button</Button>
    <Button type="success">Success Button</Button>
    <Button type="warning">Warning Button</Button>
    <Button type="danger">Danger Button</Button>
    <Button type="link">Link Button</Button>
  </Space>
  </div>
</Playground>

